<template>
  <div class="home">
    <div class="home-up">
      <div class="up1">
        <span>到校学生</span>
        <span>2765</span>
        <span>请假学生</span>
        <span>5</span>
        <span>未到学生</span>
        <span>2</span>
      </div>
      <div class="up2">
        <span>今日到访</span>
        <span>8</span>
        <span>今日预约</span>
        <span>8</span>
      </div>
      <div class="up3">
        <img src="@/assets/天气时间.png" />
      </div>
    </div>
    <div class="home-down">
      <div class="down1">
        <span>统计警告</span>
        <span class="down1-num">8</span>
      </div>
      <div class="down2">
        <div>
          <span>故障警告</span>
          <span class="down2-num">3</span>
        </div>
        <div>
          <span>温湿度告警</span>
          <span class="down2-num">2</span>
        </div>
        <div>
          <span>黑名单告警</span>
          <span class="down2-num">5</span>
        </div>
        <div>
          <span>踩踏告警</span>
          <span class="down2-num">3</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Home",
  methods: {
    getRouterParams() {
      // let orgId = this.$route.params.orgId;         //接收到了路由传过来的orgId
      // let params = { orgId: orgId };
    },
  },
  mounted() {
    this.getRouterParams();
  },
};
</script>

<style scoped lang="scss">
@import "../../public/style";
.home {
  display: flex;
  flex-direction: column;
  .home-up {
    display: flex;
    flex-direction: row;
    height: 300px;
    margin-bottom: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    grid-column-gap: 40px;
    div {
      height: 100%;
      border: solid 1px $normalColor;
      overflow: hidden;
    }
    .up1,
    .up2 {
      font-size: 24px;
      font-weight: 700;
      display: grid;
      color: $normalColor;
      text-align: center;
    }
    .up1 {
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr 1fr;
      line-height: 80px;
    }
    .up2 {
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr;
      line-height: 100px;
    }
    .up3 > img {
      position: relative;
      top: 40px;
      left: 2vw;
    }
  }

  .home-down {
    height: 300px;
    border: solid 1px $normalColor;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    .down1 {
      margin-top: 20px;
      margin-left: 20px;
      margin-bottom: 30px;
      color: $normalColor;
      font-size: 20px;
      font-weight: 700;
      .down1-num {
        margin-left: 50px;
        font-size: 50px;
      }
    }
    .down2 {
      margin-left: 20px;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      grid-column-gap: 30px;
      div {
        margin-bottom: 20px;
        color: rgb(119, 119, 119);
        .down2-num {
          margin-left: 50px;
        }
      }
    }
  }
}
</style>